<?php
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
	exit('Access Denied');
}

$sql = <<<EOF
DROP TABLE IF EXISTS pre_plusin_sxooo_vote_admin;
CREATE TABLE `pre_plusin_sxooo_vote_admin` (
  `id` int(11) NOT NULL auto_increment,
  `view_group` int(1) NOT NULL default '0',
  `vote_group` int(1) NOT NULL default '0',
  `weburl` varchar(65) default NULL,
  `webname` varchar(53) default NULL,
  `by` varchar(117) default NULL,
  `gbook_os` int(1) NOT NULL default '1',
  `gbook_yzos` int(1) NOT NULL default '1',
  `gbook_group` int(1) NOT NULL default '1',
  `gbook_jg` int(1) NOT NULL default '1',
  `gbook_jgtime` int(5) NOT NULL default '1',
  `vote_yzos` int(1) NOT NULL default '1',
  `vote_jg` int(1) NOT NULL default '1',
  `vote_jgtime` int(5) NOT NULL default '1',
  `ms_os` int(1) NOT NULL default '0',
  `ms_uid` int(8) default NULL,
  `pagexs` int(5) default NULL,
  `pagepl` int(5) default NULL,
  `pagesh` int(5) default NULL,
  `hdggos` int(1) NOT NULL default '1',
  `hdggtype` int(1) default NULL,
  `xsjjos` int(1) NOT NULL default '1',
  `gbookos` int(1) NOT NULL default '1',
  `xguid` int(8) NOT NULL default '1',
  `jbzlos` int(1) NOT NULL default '1',
  `svotepic` varchar(100) NOT NULL default '',
  `zzs` int(1) default NULL,
  `byb` int(1) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT;

DROP TABLE IF EXISTS pre_plusin_sxooo_vote_gbook;
CREATE TABLE `pre_plusin_sxooo_vote_gbook` (
  `id` mediumint(8) NOT NULL auto_increment,
  `gname` varchar(15) NOT NULL default '',
  `ginfo` varchar(100) NOT NULL default '',
  `glid` int(5) NOT NULL default '0',
  `xsid` int(5) NOT NULL default '0',
  `gtime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `guid` int(8) default NULL,
  `ip` varchar(15) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT;

DROP TABLE IF EXISTS pre_plusin_sxooo_vote_hd;
CREATE TABLE `pre_plusin_sxooo_vote_hd` (
  `hdid` mediumint(8) NOT NULL auto_increment,
  `hdname` varchar(50) NOT NULL default '',
  `hdvoteos` int(1) NOT NULL default '1',
  `hdbmos` int(1) NOT NULL default '1',
  `hdtpcs` int(8) NOT NULL default '1',
  `hdipcs` int(8) NOT NULL default '1',
  `hdjianjie` varchar(1000) NOT NULL default '',
  `hdsjjlos` int(1) NOT NULL default '1',
  `hdjlzd` varchar(11) NOT NULL default 'extcredits2',
  `hdjlxx` int(5) NOT NULL default '1',
  `hdjlsx` int(5) NOT NULL default '5',
  `hdxsxg` int(1) NOT NULL default '0',
  `hdindex` int(2) NOT NULL default '0',
  PRIMARY KEY  (`hdid`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT;

DROP TABLE IF EXISTS pre_plusin_sxooo_vote_info;
CREATE TABLE `pre_plusin_sxooo_vote_info` (
  `infoid` mediumint(8) NOT NULL auto_increment,
  `xsid` int(8) default NULL,
  `hdid` int(8) default NULL,
  `foa` varchar(30) default NULL,
  `fob` varchar(30) default NULL,
  `foc` varchar(30) default NULL,
  `fod` varchar(30) default NULL,
  `foe` varchar(30) default NULL,
  `fof` varchar(30) default NULL,
  `fog` varchar(30) default NULL,
  `foh` varchar(30) default NULL,
  `foi` varchar(30) default NULL,
  `foj` varchar(30) default NULL,
  `fok` varchar(30) default NULL,
  `fol` varchar(30) default NULL,
  `pea` int(1) NOT NULL default '1',
  `peb` int(1) NOT NULL default '1',
  `pec` int(1) NOT NULL default '1',
  `ped` int(1) NOT NULL default '1',
  `pee` int(1) NOT NULL default '1',
  `pef` int(1) NOT NULL default '1',
  `peg` int(1) NOT NULL default '1',
  `peh` int(1) NOT NULL default '1',
  `pei` int(1) NOT NULL default '1',
  `pej` int(1) NOT NULL default '1',
  `pek` int(1) NOT NULL default '1',
  `pel` int(1) NOT NULL default '1',
  PRIMARY KEY  (`infoid`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT;

DROP TABLE IF EXISTS pre_plusin_sxooo_vote_menu;
CREATE TABLE `pre_plusin_sxooo_vote_menu` (
  `menuid` mediumint(8) NOT NULL auto_increment,
  `ina` varchar(10) default NULL,
  `inb` varchar(10) default NULL,
  `inc` varchar(10) default NULL,
  `ind` varchar(10) default NULL,
  `ine` varchar(10) default NULL,
  `inf` varchar(10) default NULL,
  `ing` varchar(10) default NULL,
  `inh` varchar(10) default NULL,
  `ini` varchar(10) default NULL,
  `inj` varchar(10) default NULL,
  `ink` varchar(10) default NULL,
  `inl` varchar(10) default NULL,
  `tya` int(1) NOT NULL default '1',
  `tyb` int(1) NOT NULL default '1',
  `tyc` int(1) NOT NULL default '1',
  `tyd` int(1) NOT NULL default '1',
  `tye` int(1) NOT NULL default '1',
  `tyf` int(1) NOT NULL default '1',
  `tyg` int(1) NOT NULL default '1',
  `tyh` int(1) NOT NULL default '1',
  `tyi` int(1) NOT NULL default '1',
  `tyj` int(1) NOT NULL default '1',
  `tyk` int(1) NOT NULL default '1',
  `tyl` int(1) NOT NULL default '1',
  PRIMARY KEY  (`menuid`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT;

DROP TABLE IF EXISTS pre_plusin_sxooo_vote_tp;
CREATE TABLE `pre_plusin_sxooo_vote_tp` (
  `id` mediumint(8) NOT NULL auto_increment,
  `uname` varchar(15) NOT NULL default '',
  `tid` mediumint(8) NOT NULL default '0',
  `tptime` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `ip` varchar(50) NOT NULL default '',
  `thdid` int(11) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT;

DROP TABLE IF EXISTS pre_plusin_sxooo_vote_xs;
CREATE TABLE `pre_plusin_sxooo_vote_xs` (
  `xsid` mediumint(8) NOT NULL auto_increment,
  `xsname` varchar(15) NOT NULL default '',
  `xsuid` mediumint(8) NOT NULL default '0',
  `xsnicheng` varchar(6) NOT NULL default '',
  `pic` int(1) NOT NULL default '0',
  `say` varchar(20) default NULL,
  `info` varchar(1000) NOT NULL default '',
  `bmtime` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `p` mediumint(8) NOT NULL default '0',
  `r` mediumint(8) NOT NULL default '0',
  `sh` int(1) NOT NULL default '0',
  `hdid` int(11) default NULL,
  `src` varchar(20) default NULL,
  PRIMARY KEY  (`xsid`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT;

DROP TABLE IF EXISTS pre_plusin_sxooo_vote_zzs;
CREATE TABLE `pre_plusin_sxooo_vote_zzs` (
  `zzsid` mediumint(8) NOT NULL auto_increment,
  `zzsname` varchar(20) NOT NULL default '',
  `zzsimg` varchar(100) NOT NULL default '',
  `zzsurl` varchar(100) NOT NULL default '',
  `zzsindex` int(2) NOT NULL default '1',
  PRIMARY KEY  (`zzsid`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT;

DROP TABLE IF EXISTS pre_plusin_sxooo_vote_xsimg;
CREATE TABLE `pre_plusin_sxooo_vote_xsimg` (
  `Id` int(11) NOT NULL auto_increment,
  `xsid` int(11) default NULL,
  `hdid` int(11) default NULL,
  `src` varchar(100) default NULL,
  `xsuid` int(11) default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT;


INSERT INTO pre_plusin_sxooo_vote_menu VALUES ('1',0xd0d4b1f0,0xc4eac1e4,0xc9edb8df,0xcce5d6d8,0xd1aad0cd,0xbbe9b7f1,0xd1a7c0fa,0xd6b0d2b5,0xbcaeb9e1,0xd0c7d7f9,0xa3d1a3d1,0xb5e7bbb0,'1','1','1','1','1','1','1','1','1','1','1','1');
EOF;
runquery($sql);

require_once DISCUZ_ROOT.'./source/discuz_version.php';
$finish = TRUE;
?>